﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySql.Data.MySqlClient;
using System.Data;


/// <summary>
/// Summary description for Companies
/// </summary>
public class Companies
{
  private const string SP = "Company_GetAll";
  private const string SP2 = "Company_GetByCountry";
  private DatabaseManager db;
 
  public Companies()
  {
    db = new DatabaseManager();
  }

  public MySqlDataReader GetCompanies()
  {
    return db.ExecuteStoredProcedure(SP);
  }

  public MySqlDataReader GetCompaniesByCountry(string CountryId)
  {
    db.AddParameter("@CountryId", CountryId);
    return db.ExecuteStoredProcedure(SP2);
  }
}